layui.use(['jquery','table'],function () {
    let $ = layui.$;
    let table = layui.table;

    setTimeout(getCourseAuditDetails,50)

    function getCourseAuditDetails() {
        var courseId = $('#courseId').val();
        $.ajax({
            url: '/courseRecord/getCourseAuditDetails',
            data: {
                courseId: courseId,
                type: 2
            },
            dataType: 'json',
            success: function (data) {
                table.render({
                    elem: '#courseAuditTable',
                    title: '审核信息',
                    data: data.data,
                    limit: 10,
                    page:{
                        layout:['count','prev','page','next','limit','skip','refresh'],
                        //limits:[3,6,9],
                        first:"首页",
                        last:"尾页",
                    },
                    cols: [[
                        {field:"implementDate",title:"审核时间",align:'center'},
                        {field:"account",title:"审核人员",align:'center'},
                        {field:"result",title:"审核结果",align:'center',templet:function(data){
                            if(data.result == 1){
                                return '审核通过'
                            }else if(data.result == 3){
                                return '审核驳回'

                            }
                        }},
                        {field:"remarks",title:"反馈详情",align:'center'},
                    ]]
                })
            }
        });
    }
})